home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
disk
/
bss150.zip
/
BSS.DOC
next >
Wrap
Text File
|
1996-06-28
|
26KB
|
609 lines
Bunch's String Search Utility Copyright (c) 1993-1996 by David Bunch V1.50
Usage:
BSS [switches] FILE.NAM,file2,etc STRING,string,etc
switches: (To create Documentation execute BSS /O=BSS.DOC /? )
/A Treat all files as ASCII /B for BBS file type listing
/BEfore=MM/DD/YY or HH:MM:SS Searches files after a certain DATE or TIME.
/C:# search for string starting in this column only
/D# String search DELIMITER /E EXACT matches only
/F display FILES that match wild cards (no search string used or needed)
/FS display SUBTOTALS of SUBdir's /FR display totals of ROOT dir's
/H=BLink, BOLD(default), Reverse, No highlighting, [],{},(),or ''
/I:ASHRE INCLUDE files with the following attribs (use /I:SH for all files)
/J Print JUST strings that match, /K:# sKip lines longer that # (134 def.)
/L:*? wiLd search (the * & ? can be any 2 characters you wish to use)
/M=AND or /M=OR (default) or /M=NAND or /M=NOR
/MIN=# and /MAX=# (min/max file sizes to look at #=number of bytes)
/N Print NAMES for non matches /O=filename OUTPUT to this file name
/P:# PAUSE after each screen /R=filename REDIRECT input of strings
/S search all SUB directories, or /SN (no printing of directory names)
/SInce=MM/DD/YY or HH:MM:SS Searches files after a certain DATE or TIME.
/T output TOTAL matches only /U USE Dos standard wild carding
/W WINDOW: [W=before,after] (ie. /W=5,6)
/X=file,file,etc eXclude files /? Display additional information
/#=n or /#H=n Print line numbers (n = number of chars. to use)
DISCLAIMER:
BSS is being distributed on an as-is-basis. There is no warranty
of any kind. The author is not responsible for any damages,
including lost profits or other incidental or consequential damage
that may result from the use of this program.
Some further info about switches:
All switches are non case sensitive. When more than 1 character is
needed for a switch only 2 characters need be entered.
/A This will treat all files as ASCII. Normally BSS will figure out
whether it is a binary file or not, but if it does not, try this
switch. Be aware that you may get a lot of junk characters on your
display for binary files, because normally it will not even search
binary areas if it decides that it binary. Use this with CAUTION.
Program turns of windowing if used in conjunction with this & issues
you a warning, but continues the search after you hit a return. This
could cause a problem, in that you could be trying to look at too
many records than could fit into my 8K read buffer. By using this
switch, the program always looks for "LF" character for the end of
record.
/B This switch is primarily used for searching descriptions of BBS file
listings that span more than 1 line. If a match is found when this
switch is active, the complete description of the file name will be
printed. All the program does is look for a SPACE or TAB character
as the 1st character of a line to decide whether the description is
continued or not. I chose this method because it was simply to
implement, & could have other uses for any file that has sections
of information starting with a non-blank character. If used in
conjunction with the /M=A switch, it will print a match if all matches
are found anywhere in the description, not just on 1 line together.
If you are searching a BBS listing for the string "midi" & only wanted
a listing of the names that had those matches in it, use the /BN
switch. For example:
Searching a listing normally would print out this type of format
TEMHUMDX.ZIP 33568 07-29-92 Calculate temp/humidity for discomfort lvl.
MIDVOL3.ZIP 39183 01-01-93 Collection of midi songs
CATSP180.ZIP 94212 01-10-93 WAVE AND MIDI PLAYER FOR WIN-FEW OPTIONS
By using the /BN switch you would only get
TEMHUMDX.ZIP
MIDVOL3.ZIP
CATSP180.ZIP
If you used the switch /BF you would also get the file name that
it found them in.
You will also get NO HILIGHTING if you use the /BF or /BN switch.
If you find that this switch does not work on what you think is an
ASCII file, it probably found a line longer than 132 characters in it
& you can get around this by using /A switch in conjunction with this.
/C:# Search for string starting in this column only. Valid Column positions
start at 1 & go up from there. You can enter "/C:0" if you like & it
will set it to 1. The default position is 1. This should work for
both ASCII & binary files. If used in conjunction with the "/B",
"/WP", or "WR" position is offset from 1st character on the 1st line.
/D# If you are looking for a string or strings that have a comma in them
just specify a character with this switch that is not in any of your
search strings. The "/" or TAB character can not be used, but if you
used "/D" with no character following it, it will use the SPACE
character.
Examples:
BSS *.* looking for this sentence,and this one
This would search for 2 strings "looking for this sentence"
& "and this one". If you add a space before or after the comma, it
will be included in search string.
BSS /D" *.* Dec 1, 1992"Jan 2, 1993
Would search for "dec 1, 1992" & "Jan 2, 1993"
/E This changes the default setting of case insensitive search. It will
check for exact case on searches.
/F display FILES that match wild cards (no search string needed). This
is handy if you are looking for a file on your disk & you only know
1 or more characters in the name. When it finds a match, it will
display the 1st non-wild card name it found that matched & highlight it
accordingly. It also displays the size, date, & time of each file.
For Example:
BSS /F *S*.*E*
This could find the file BSS.EXE. Highlight the 1st "S" in "BSS" &
the 1st "E" in "EXE". If you had entered *SS*.*E*, it would have
highlighted both "SS" 's. If you use this in conjunction with /U
you will not get any highlighting.
/FR Instead of displaying subtotals of all directores, It displays totals
of each main ROOT directory & it's subdirectories in 1 subtotal.
Example:
2,276,279 C:\
8,109,377 C:\DOS
717,983 C:\DSKMGR
293,555 C:\SBCD
3,561,194 C:\TEMP
32,619,128 C:\WINDOWS
/FS Display Subtotals of Subdirectories.
Example:
2,276,279 C:\
8,109,377 C:\DOS
717,983 C:\DSKMGR
105,038 C:\SBCD
23,637 C:\SBCD\DRV
164,880 C:\SBCD\PLAYCD
3,186,417 C:\TEMP
374,777 C:\TEMP\TP
10,225,209 C:\WINDOWS
21,241,900 C:\WINDOWS\SYSTEM
55,296 C:\WINDOWS\TWAIN
944,147 C:\WINDOWS\TWAIN\SNAPPY
152,576 C:\WINDOWS\TWAIN\PHOTO
/G This enables searching for 44 IBM graphics drawing characters starting
with ASCII character 180 decimal.
/H=BLink, BOld(default), Reverse, No highlighting
/H=BL blink
/H=BO bold
/H=R reverse
/H=N no highlighting
/H=[] enclose match in brackets, useful if outputting to a file
() or doing a print screen
<>
{}
An additional option that Tim Wilson requested was to enclose the match
in brackets. I decided to make it a bit more flexible, so you can add
whatever characters you want before & after the match. Just enter the
2 characters you want to use. If you are not outputting this search
to a file, it will also use BOLD hilighting on the screen.
This allows you to use the type of highlighting that you want, if you
do not like the default.
/I=ASHRE The default file type to search thru are normal files. This switch
allows you to look for or thru files with the following attributes set.
Archive, System, Hidden, Read-only. You can enter these in any order,
but should be entered 1 behind the other with no other characters. If
you want to look at all types of files, you only need enter "/I=SH".
This is because DOS does not check the ARCHIVE or READONLY bits in it's
Find 1st match call (INT 21h, service 4eh), so I decided to use these
a little differently. If you set 1